/**
 * Created by wry on 2015/4/2.
 */

module.exports = function (app) {
    var score = require('../controllers/score-controller');

    app.get('/rest/' + RESTFullServiceVersion + '/Score/getUserScore/:token/:deviceId', score.getUserScore);
    app.get('/rest/' + RESTFullServiceVersion + '/Score/getUserScoreAddRecord/:pageNo/:token/:deviceId', score.getUserScoreAddRecord);
    app.get('/rest/' + RESTFullServiceVersion + '/Score/getUserScoreConsumeRecord/:pageNo/:token/:deviceId', score.getUserScoreConsumeRecord);
    app.get('/rest/' + RESTFullServiceVersion + '/Score/getScoreShopList/:pageNo/:token/:deviceId', score.getScoreShopList);
    app.post('/rest/' + RESTFullServiceVersion + '/Score/exchangeGoods/:token/:deviceId', score.exchangeGoods);

    //TODO:
    app.get('/rest/' + RESTFullServiceVersion + '/Score/getUserScoreAddRecord/:pageNo/:token/:deviceId', score.getUserScoreAddRecord);/*TODO：取得某个用户添加积分的记录*/


    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/score/getGoodsList/:pageNo', score.getGoodsList);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/addGoods', score.addGoods);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/changeGoodsStatus', score.changeGoodsStatus);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/getExchangeRecordList', score.getExchangeRecordList);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/addScore', score.addScore);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/examineProduct', score.examineProduct);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/addScoreManual', score.addScoreManual);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/score/importScoreManual', score.importScoreManual);
};